package com.leizhi.demo.monitor.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description 设备信息
 * @Version 1.0.0-SNAPSHOT
 * @Author leizhi
 * @Date 2025/4/27 11:25
 */
@Data
@NoArgsConstructor
public class Device {

    /* 设备Id */
    private String deviceId;

    /* wan地址 */
    private Host host;

    /* 默认通道 */
    private String acquiesceChannel;

    /* 信令传输协议 */
    private String signalingProtocol;

    /* 流媒体传输协议 */
    private String flowProtocol;

    /* 是否云存储 */
    private Boolean isCloud;

    /* 通道列表 */
    private Map<String, DeviceChannel> channelMap;


    public Device(String deviceId, String signalingProtocol) {
        this.deviceId = deviceId;
        this.signalingProtocol = signalingProtocol;
        this.isCloud = false;
    }

    public Map<String, DeviceChannel> getChannelMap() {
        if (channelMap == null) {
            channelMap = new HashMap<>(5);
        }
        return channelMap;
    }

}
